﻿<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<title>丝路广惠-分类</title>
		<link rel="stylesheet" type="text/css" href="../../src/css/base.css"/>
		 
	</head>

	<body class="body-bg"> 
		<header class="searchs fixed setup-btm bg-fff" >
			<a href="searchs.html" class="blocks body-bg seach-a" ><i class="iconfont icon-sousuo pad-lr"></i><span class="s12m">寻找宝贝</span></a>
		</header>
		 
		<div id="classify">
			<div id="classify-left">

			</div>
			<div id="classify-right">
				 
			</div>
		</div>
		<!--底部导航 -->
		<div class="bottom-nav">
			<div class="sc-box">
				<a href="homeintegral.html?type=2"><img src="../../src/images/button_jifenshangcheng.png" /></a>
				<a href="homeoffline.html?type=2"><img src="../../src/images/button_xianxiashangcheng.png" /></a>
			</div>
			<footer  class="centre flexs-al setup-u">
				<a class="flex1" href="index.html?type=0">
					<i class="iconfont icon-five"></i>
					<p>首页</p>
				</a>
				<a class="flex1" href="homeclassify.html?type=1">
					<i class="iconfont icon-one"></i>
					<p>分类</p>
				</a>
				<a class="flex1"  href="javascript:void(0)" id="slicksShop" index=0 >
					<div class="switch">
						<img src="../../src/images/button_close.png" />
					</div>
					<div class="switch">
						<i class="iconfont icon-four"></i>
						<p>丝路商城</p>
					</div>
				</a>
				<a class="flex1" href="../order/index.html?type=3">
					<i class="iconfont icon-three"></i>
					<p>购物车</p>
				</a>
				<a class="flex1" href="../center/index.html?type=4">
					<i class="iconfont icon-anonymity"></i>
					<p>我的</p>
				</a>
			</footer>
		</div>
		<script type="text/html" id="classify-lefts">
			<ul>
				{{# for(var i = 0; i
				< d.PageData.length; i++){ }} <li {{# if(i==0){ }} class="active" {{# } }}>
					{{d.PageData[i].ProductType_Name}}
					</li>
					{{# } }}
			</ul>
		</script>
		<script type="text/html" id="classify-rights">
			{{# for(var i = 0; i
			< d.Child.length; i++){ }} <dl>
				<dt class="s12m">{{d.Child[i].ProductType_Name}}</dt> {{# for(var j = 0; j
				< d.Child[i].Child.length; j++){ }} <dd>
					<a  href="../order/goodslist.html?TypeID={{d.Child[i].Child[j].ProductType_ID}}">
						<img class="wh100" src="http://image.siluguanghui.com/Image/big{{d.Child[i].Child[j].Image_Url}}" />
					</a>
					<p class="aline">{{d.Child[i].Child[j].ProductType_Name}}</p>
					</dd>

					{{# } }}

					</dl>
					{{# } }}
		</script>
		 
		<script src="http://apps.bdimg.com/libs/laytpl.js/1.1/laytpl.js" type="text/javascript" charset="utf-8"></script>
		<script src="//cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
		<script src="../../src/js/all.js" type="text/javascript" charset="utf-8"></script>
		<script>
			var allchild = [];
			var setClassify = function(n) {
				laytpl($("#classify-rights").html()).render(allchild[n], function(html) {
					$("#classify-right").html(html);
				});
			};
			(function () {
				silks.loaded(true);
				silks.temp(["#classify-lefts", "#classify-left"], "/WorkProductType/GetProductTypeByBelong", {
					Belong: silks.getByVal("Belong") ? silks.getByVal("Belong") : ""
				}, function() {
					allchild = this.PageData;
					setClassify(0);
					silks.loaded(false);
					$("#classify-left").on("click", function(e) { // 点击左导航切换
						$(e.target).addClass("active").siblings().removeClass("active");
						setClassify($(e.target).index());
					});
	 				
				});
			}())
			
			silks.fooChoo(); // 商城选择点击
		</script>
	</body>

</html>